package com.CST.mapper.cst.ys;

import com.CST.dto.ys.YsManageSubjectDTO;
import com.CST.entity.ys.YsDepartment;
import com.CST.entity.ys.YsManageSubject;
import com.CST.vo.ys.YsManageSubjectListVO;
import com.CST.vo.ys.YsManageSubjectVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author qtx
 * @since 2023-04-24
 */
@Mapper
public interface YsManageSubjectMapper extends BaseMapper<YsManageSubject> {

    /**
     * 分页查询
     * @param page 分页参数
     * @param dto 条件
     * @return 分页集合
     */
    IPage<YsManageSubjectVO> selectPageNew(@Param("page") Page<YsManageSubject> page,@Param("dto") YsManageSubjectDTO dto);

    /**
     * 集合查询
     * @param dto 条件
     * @return 集合
     */
    List<YsManageSubjectVO> selectNew(@Param("dto") YsManageSubjectDTO dto);

    List<YsDepartment> selectDepartments(Map<String,Object> map);

    /**
     * 查询
     * @param subjectId 预算id
     * @param name 用友名称
     * @return 集合
     */
    List<YsManageSubjectListVO> selectNew1(Long subjectId, String name);

    Integer selectByIds(YsManageSubject entity);
}
